import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase="DBshop048_删除积分规则"

testCase="DBshop047_编辑积分规则"
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,"客户管理","管理积分","积分规则")
firefox.find_element_by_xpath("//td[text()='遵守规则']/following-sibling::td[4]/a[2]").click()
firefox.switch_to_alert().accept()

time.sleep(3)

try:
    firefox.find_element_by_xpath("//td[text()='遵守规则']")
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
except:
    writeLog("%s 测试成功" % testCase)
